package com.buss.customer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.buss.core.persistence.ResultList;
import com.buss.customer.dao.CustomerAccountDao;
import com.buss.customer.model.CustomerAccount;
import com.buss.customer.service.CustomerAccountService;

@Service
public class CustomerAccountServiceImpl implements CustomerAccountService {

	@Autowired
	private CustomerAccountDao accountDao;

	@Override
	public CustomerAccount saveAccount(CustomerAccount account) {
		return accountDao.saveAccount(account);
	}

	@Override
	public void editAccount(CustomerAccount account) {
		accountDao.editAccount(account);
	}

	@Override
	public void removeAccount(Long[] ids) {
		accountDao.removeAccount(ids);
	}

	@Override
	public CustomerAccount loadAccount(Long id) {
		return accountDao.loadAccount(id);
	}

	@Override
	public ResultList<CustomerAccount> queryAccount(Long customerId,
			String accountName, String accountNumber) {
		return accountDao.queryAccount(customerId, accountName, accountNumber);
	}
	
}
